/*
主人的路由容器组件
*/

import React,{Component} from 'react'
import {connect} from 'react-redux'
import {getUserList} from '../../redux/actions'

import UserList from '../../components/user-list/user-list'


class Zhuren extends Component{
    componentDidMount(){
        //获取userlist
        this.props.getUserList('customer')
    }

    render(){
        return(
            <UserList userlist={this.props.userlist}/>
        )
    }
}

export default connect(
    state => ({userlist:state.userlist}),
    {getUserList}
)(Zhuren)